<?php
global $base_dir;
$base_dir='../';

/**** 模块调用*****/
include_once($base_dir."inc/inc_connect.php");		//通用函数包含文件
include_once("index_inc.php");
include_once("func/function.php");
include_once("api/msg_mdlAPI.php");					//短信API
include_once($base_dir."inc/manage.php");			//后台通用包含文件
?>
<?php
//接收参数
if(is_array($_GET))
{
	foreach($_GET as $key => $value)
	{
		$$key=$value;
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$lanmu_name?>-后台管理系统</title>
<link href="../style/common.css" rel="stylesheet" type="text/css" />
<script src="../js/checkform.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/kindeditor/kindeditor.js"></script>

<link href="../js/dq_calendar/dq_calendar.css" rel="stylesheet" type="text/css" />
<script src="../js/dq_calendar/dq_calendar.js" type="text/javascript"></script>
<script language="javascript">
//表单验证
function this_submit()
{
	if(checkform())
	{
		document.f1.submit();
	}
}
</script>
</head>
<body>
<?php
$t=new Tbl_Act($tbl_name,$tbl_key);		//创建表对象
$t->$tbl_key=$_GET['id'];
$t->GetOne(array($tbl_key.',='));
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="lanmu_table">
  <tr>
    <td height="30" valign="bottom"><a href="<?=$url_list?>"><span class="lanmu_title"><?=$lanmu_name?></span></a><span class="lanmu_title2">&nbsp;&gt;&nbsp;修改</span></td>
  </tr>
</table>
<form action="<?=$url_act?>?<?=QueryString()?>" method="post" name="f1" enctype="multipart/form-data">
  <table border="0" cellspacing="1" class="margintop30">
  <tr>
		<td width="114" height="25" align="right" class="title01">模板名称:</td>
		<td width="616" class="list_content1"><label><input name="mdl_name" type="text" id="mdl_name" value="<?=$t->mdl_name?>" bt="1" char="模板名称"/><span class="red">*</span>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">模板内容:</td>
		<td width="616" class="list_content1"><label><textarea name="mdl_content" cols="40" rows="5" id="mdl_content" char="模板内容" bt="1"><?=$t->mdl_content?></textarea><span class="red">*</span>
		&nbsp;&nbsp;</label></td>
	  </tr>
	  <tr>
        <td height="25" align="right" class="title01">参数说明:</td>
	    <td class="list_content1"> 将以下参数插入短信内容中形成一句完整的通顺的语句：<br/>
	      <?php
	$paramInfo=getModelParam();
	if(is_array($paramInfo))
	{
		$str='';
		foreach($paramInfo as $k => $v)
		{
			$str.='<span style="color:#ff0000">'.$v[1].'</span>： '.$v[2].'<br/>';
		}
		echo $str;
	}
	?>
        </td>
    </tr>  
	  <tr>
		<td width="114" height="25" align="right" class="title01">是否应用:</td>
		<td width="616" class="list_content1"><label>否<input name="mdl_available" type="radio" value="0" >&nbsp;&nbsp;是<input name="mdl_available" type="radio" value="1" >
<?php
if($t->mdl_available!='')
{
	echo '<script language="javascript">setRadio_checked("'.$t->mdl_available.'","mdl_available");</script>';
}
?>
		&nbsp;&nbsp;</label></td>
	  </tr>
    <tr>
      <td height="25" colspan="2" align="center" class="list_content1"><input type="button" name="Submit2" value="提交" onclick="this_submit()" />
        &nbsp;&nbsp;
        <input name="reset" type="reset" value="重填" />
        <input name="<?=$tbl_key?>" type="hidden" id="<?=$tbl_key?>" value="<?=$id?>" />
        <input name="act" type="hidden" id="act" value="update" />      </td>
    </tr>
  </table>
</form>
<!-- 7caihu.com Baidu tongji analytics -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");

document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb8797ecb21d1ccb839c35b190277a0cd' type='text/javascript'%3E%3C/script%3E"));

</script>
</body>
</html>
<?php
include_once($base_dir."inc/inc_unconnect.php")
?>